package dao.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "score", catalog = "makeiteasy")
public class Score implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 1L;
	private Integer scoreId;
	private Student student;
	private Test test;
	private Integer scoreNo;
	private String scoreListenAns;
	private String scoreSeletionAns;
	private String scoreTranslateAns;
	private String scoreRewriteAns;
	private String scoreReadAns;
	private String scoreWriteAns;

	// Constructors

	/** default constructor */
	public Score() {
	}

	/** minimal constructor */
	public Score(Integer scoreId) {
		this.scoreId = scoreId;
	}

	/** full constructor */
	public Score(Integer scoreId, Student student, Test test, Integer scoreNo,
			String scoreListenAns, String scoreSeletionAns,
			String scoreReadAns, String scoreWriteAns) {
		this.scoreId = scoreId;
		this.student = student;
		this.test = test;
		this.scoreNo = scoreNo;
		this.scoreListenAns = scoreListenAns;
		this.scoreSeletionAns = scoreSeletionAns;
		this.scoreReadAns = scoreReadAns;
		this.scoreWriteAns = scoreWriteAns;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "scoreId", unique = true, nullable = false)
	public Integer getScoreId() {
		return this.scoreId;
	}

	public void setScoreId(Integer scoreId) {
		this.scoreId = scoreId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "stuId")
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "testId")
	public Test getTest() {
		return this.test;
	}

	public void setTest(Test test) {
		this.test = test;
	}

	@Column(name = "scoreNo")
	public Integer getScoreNo() {
		return this.scoreNo;
	}

	public void setScoreNo(Integer scoreNo) {
		this.scoreNo = scoreNo;
	}

	@Column(name = "scoreListenAns", length = 32)
	public String getScoreListenAns() {
		return this.scoreListenAns;
	}

	public void setScoreListenAns(String scoreListenAns) {
		this.scoreListenAns = scoreListenAns;
	}

	@Column(name = "scoreSeletionAns", length = 32)
	public String getScoreSeletionAns() {
		return this.scoreSeletionAns;
	}

	public void setScoreSeletionAns(String scoreSeletionAns) {
		this.scoreSeletionAns = scoreSeletionAns;
	}

	@Column(name = "scoreTranslateAns", length = 512)
	public String getScoreTranslateAns() {
		return this.scoreTranslateAns;
	}
	
	public void setScoreTranslateAns(String scoreTranslateAns) {
		this.scoreTranslateAns = scoreTranslateAns;
	}
	
	@Column(name = "scoreRewriteAns", length = 512)
	public String getScoreRewriteAns() {
		return this.scoreRewriteAns;
	}
	
	public void setScoreRewriteAns(String scoreRewriteAns) {
		this.scoreRewriteAns = scoreRewriteAns;
	}
	
	@Column(name = "scoreReadAns", length = 32)
	public String getScoreReadAns() {
		return this.scoreReadAns;
	}

	public void setScoreReadAns(String scoreReadAns) {
		this.scoreReadAns = scoreReadAns;
	}

	@Column(name = "scoreWriteAns", length = 32)
	public String getScoreWriteAns() {
		return this.scoreWriteAns;
	}

	public void setScoreWriteAns(String scoreWriteAns) {
		this.scoreWriteAns = scoreWriteAns;
	}

}